import {ApiFetch} from "../api/apiHandler";
import {BaseUrl} from "../constant/constant";

class IOSWechatModalControl {

    constructor() {
        this.url = BaseUrl
    }

    get(params) {
        let end = this.url + 'getrechargedirect'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    change(params) {
        let end = this.url + 'setrechargedirect'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    vote(params) {
        let end = this.url + 'getselectionstate'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    task(params) {
        let end = this.url + 'gettaskcenterstate'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    setVote(params) {
        let end = this.url + 'setselectionstate'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    setTask(params) {
        let end = this.url + 'settaskcenterstate'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    gameAd(params) {
        let end = this.url + 'getmatchadv'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    setGameAd(params) {
        let end = this.url + 'setmatchadv'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    index(params) {
        let end = this.url + 'getzhishustate'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    setIndex(params) {
        let end = this.url + 'setzhishustate'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    room(params) {
        let end = this.url + 'getvipboxstate'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    setRoom(params) {
        let end = this.url + 'setvipboxstate'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }
}

export default IOSWechatModalControl
